<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\Models\AdminUser;
class MyCommand extends Command
{

    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'generate:card';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'MM-------------';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        $max=15;//账号
        $day=2;///天数
        $email='TEST';//

        $p=21082201;
        for($i=0;$i<$max;$i++){
            $pp=$p+$i;
            $password=mt_rand(11111,99999);
            AdminUser::create(['email'=>$email.$pp,'day'=>$day,'password'=>bcrypt($password)]);
            $this->info($i."账号:".$email.$pp.'密码：'.$password);
        }
    }
}
